<?php
/**
 * Trait Question
 * User: Administrator
 * Date: 2020/2/13 0013
 * Time: 下午 7:13
 */
namespace app\api\traits\model\questions;

Trait QuestionCategory {

    public function child()
    {
        return $this->hasMany('QuestionCategory', 'pid');
    }

    public function questions()
    {
        return $this->hasMany('Question', 'category');
    }

}